package com.k2data.Utils;

import java.util.Map;

import org.apache.commons.lang.StringUtils;

/**
 * Created by wangyn on 17-3-13.
 */
public class EnvConf {

    private static Map<String, String> env;

    private EnvConf() {	}

    public static String getEvnValue(String key, String defaultValue) {
        if (null==env) {
            env = System.getenv();
        }
        String value = env.get(key);
        if (StringUtils.isEmpty(value)) {
            value = defaultValue;
        }
        return value;
    }
}

